﻿using System.Collections.Generic;
using System.Web.Mvc;
using LogikBug.ModularMvc.Events;
using LogikBug.ModularMvc.Factories;
using LogikBug.ModularMvc.Locations;
using LogikBug.ModularMvc.Navigation;
using LogikBug.ModularMvc.Registration;

namespace LogikBug.ModularMvc
{
	public interface IModuleProvider : IEnumerable<IModule>
	{
		#region Events

		event RegistrationCompleted ModuleRegistrationCompleted;

		#endregion

		#region Properties

		bool IsInitialized { get; }

		IModule this[object key] { get; }

		IRegistrationContext RegistrationContext { get; }

		IMenuFactory MenuFactory { get; }

		#endregion

		#region Methods

		bool HasModule(object key);

		void SetEnabled(object key, bool enabled);

		MvcHtmlString GenerateMenu(ViewContext viewContext);

		MvcHtmlString GenerateMenu(ViewContext viewContext, MenuType menuType);

		void Initialize(ILocation location, IRegistrationContext context);

		void Initialize(IEnumerable<ILocation> location, IRegistrationContext context);

		#endregion
	}
}
